package imper.graphic.view;

import imper.graphic.ImageManager;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.state.transition.EmptyTransition;

import TWLSlick.BasicTWLGameState;

public class LoadGameView extends BasicTWLGameState
{

  @Override
  public void init(GameContainer arg0, StateBasedGame pStateBasedGame) throws SlickException
  {
    try
    {
      ImageManager.getInstance().loadImage(new FileInputStream("data/xml/image.xml"), true);
    }
    catch (FileNotFoundException e)
    {
      e.printStackTrace();
    }
    pStateBasedGame.enterState(EnumView.MAPVIEW.getId(), new EmptyTransition(), new EmptyTransition());
  }

  @Override
  public void render(GameContainer arg0, StateBasedGame arg1, Graphics pGraphics) throws SlickException
  {
    // TODO Auto-generated method stub
    pGraphics.drawString("Load", 100,100);
  }

  @Override
  public void update(GameContainer arg0, StateBasedGame arg1, int arg2) throws SlickException
  {
    // TODO Auto-generated method stub

  }

  @Override
  public int getID()
  {
    return EnumView.LOADGAME.getId();
  }

}
